<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: OMPScheduler Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.05</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.xhtml"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classarm__compute_1_1_o_m_p_scheduler.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">OMPScheduler Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Pool of threads to automatically split a kernel's execution among several threads.  
 <a href="classarm__compute_1_1_o_m_p_scheduler.xhtml#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_o_m_p_scheduler_8h_source.xhtml">OMPScheduler.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for OMPScheduler:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classarm__compute_1_1_o_m_p_scheduler__coll__graph.svg" width="126" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.xhtml">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae64eebaa07f4d2da6cc2ba538c3cb095"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml#ae64eebaa07f4d2da6cc2ba538c3cb095">set_num_threads</a> (unsigned int <a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml#a0da94220ee1e0f4928aa31ed0d4b30f7">num_threads</a>) override</td></tr>
<tr class="memdesc:ae64eebaa07f4d2da6cc2ba538c3cb095"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number of threads the scheduler will use to run the kernels.  <a href="#ae64eebaa07f4d2da6cc2ba538c3cb095">More...</a><br /></td></tr>
<tr class="separator:ae64eebaa07f4d2da6cc2ba538c3cb095"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0da94220ee1e0f4928aa31ed0d4b30f7"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml#a0da94220ee1e0f4928aa31ed0d4b30f7">num_threads</a> () const override</td></tr>
<tr class="memdesc:a0da94220ee1e0f4928aa31ed0d4b30f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of threads that the <a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml" title="Pool of threads to automatically split a kernel&#39;s execution among several threads. ">OMPScheduler</a> has in its pool.  <a href="#a0da94220ee1e0f4928aa31ed0d4b30f7">More...</a><br /></td></tr>
<tr class="separator:a0da94220ee1e0f4928aa31ed0d4b30f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4fc1e7b1c1d9d42903cfc48351e57ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml#aa4fc1e7b1c1d9d42903cfc48351e57ad">schedule</a> (<a class="el" href="classarm__compute_1_1_i_c_p_p_kernel.xhtml">ICPPKernel</a> *kernel, unsigned int split_dimension) override</td></tr>
<tr class="memdesc:aa4fc1e7b1c1d9d42903cfc48351e57ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multithread the execution of the passed kernel if possible.  <a href="#aa4fc1e7b1c1d9d42903cfc48351e57ad">More...</a><br /></td></tr>
<tr class="separator:aa4fc1e7b1c1d9d42903cfc48351e57ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classarm__compute_1_1_i_scheduler"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarm__compute_1_1_i_scheduler')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classarm__compute_1_1_i_scheduler.xhtml">IScheduler</a></td></tr>
<tr class="memitem:a34956db09db14c551e9966c9b66036f9 inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a34956db09db14c551e9966c9b66036f9">IScheduler</a> ()</td></tr>
<tr class="memdesc:a34956db09db14c551e9966c9b66036f9 inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#a34956db09db14c551e9966c9b66036f9">More...</a><br /></td></tr>
<tr class="separator:a34956db09db14c551e9966c9b66036f9 inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d209385481644d97e7ca96072b73eb8 inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a6d209385481644d97e7ca96072b73eb8">~IScheduler</a> ()=default</td></tr>
<tr class="memdesc:a6d209385481644d97e7ca96072b73eb8 inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a6d209385481644d97e7ca96072b73eb8">More...</a><br /></td></tr>
<tr class="separator:a6d209385481644d97e7ca96072b73eb8 inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95f26c7763b9472437a8da8aa6089c9b inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_c_p_u_info.xhtml">CPUInfo</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a95f26c7763b9472437a8da8aa6089c9b">cpu_info</a> ()</td></tr>
<tr class="memdesc:a95f26c7763b9472437a8da8aa6089c9b inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get CPU info.  <a href="#a95f26c7763b9472437a8da8aa6089c9b">More...</a><br /></td></tr>
<tr class="separator:a95f26c7763b9472437a8da8aa6089c9b inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6298e3b887acb402fdda318de12428ef inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a6298e3b887acb402fdda318de12428ef">num_threads_hint</a> () const </td></tr>
<tr class="memdesc:a6298e3b887acb402fdda318de12428ef inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a hint for the best possible number of execution threads.  <a href="#a6298e3b887acb402fdda318de12428ef">More...</a><br /></td></tr>
<tr class="separator:a6298e3b887acb402fdda318de12428ef inherit pub_methods_classarm__compute_1_1_i_scheduler"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a9571a5288c1b52189b63f9e1074768e3"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml">OMPScheduler</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml#a9571a5288c1b52189b63f9e1074768e3">get</a> ()</td></tr>
<tr class="memdesc:a9571a5288c1b52189b63f9e1074768e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Access the scheduler singleton.  <a href="#a9571a5288c1b52189b63f9e1074768e3">More...</a><br /></td></tr>
<tr class="separator:a9571a5288c1b52189b63f9e1074768e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Pool of threads to automatically split a kernel's execution among several threads. </p>

<p>Definition at line <a class="el" href="_o_m_p_scheduler_8h_source.xhtml#l00032">32</a> of file <a class="el" href="_o_m_p_scheduler_8h_source.xhtml">OMPScheduler.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a9571a5288c1b52189b63f9e1074768e3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml">OMPScheduler</a>&amp; get </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Access the scheduler singleton. </p>
<dl class="section return"><dt>Returns</dt><dd>The scheduler </dd></dl>

</div>
</div>
<a class="anchor" id="a0da94220ee1e0f4928aa31ed0d4b30f7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int num_threads </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the number of threads that the <a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml" title="Pool of threads to automatically split a kernel&#39;s execution among several threads. ">OMPScheduler</a> has in its pool. </p>
<dl class="section return"><dt>Returns</dt><dd>Number of threads available in <a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml" title="Pool of threads to automatically split a kernel&#39;s execution among several threads. ">OMPScheduler</a>. </dd></dl>

<p>Implements <a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#ac24584a63e484123e3756d1b2a1c9e2f">IScheduler</a>.</p>

</div>
</div>
<a class="anchor" id="aa4fc1e7b1c1d9d42903cfc48351e57ad"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void schedule </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1_i_c_p_p_kernel.xhtml">ICPPKernel</a> *&#160;</td>
          <td class="paramname"><em>kernel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>split_dimension</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Multithread the execution of the passed kernel if possible. </p>
<p>The kernel will run on a single thread if any of these conditions is true:</p><ul>
<li><a class="el" href="classarm__compute_1_1_i_kernel.xhtml#abfab8f0d4928e1081d9f65b77933e24a" title="Indicates whether or not the kernel is parallelisable. ">ICPPKernel::is_parallelisable()</a> returns false</li>
<li>The scheduler has been initialized with only one thread.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">kernel</td><td><a class="el" href="classarm__compute_1_1_kernel.xhtml" title="Kernel class. ">Kernel</a> to execute. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">split_dimension</td><td>Dimension along which to split the kernel's execution window. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a38e28e556fea6e2024019dbb9c7cc943">IScheduler</a>.</p>

</div>
</div>
<a class="anchor" id="ae64eebaa07f4d2da6cc2ba538c3cb095"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_num_threads </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>num_threads</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the number of threads the scheduler will use to run the kernels. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">num_threads</td><td>If set to 0, then the number returned by omp_get_max_threads() will be used, otherwise the number of threads specified. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a645ac2d9d4144fd0174296de7eb1e1b5">IScheduler</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>arm_compute/runtime/OMP/<a class="el" href="_o_m_p_scheduler_8h_source.xhtml">OMPScheduler.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml">OMPScheduler</a></li>
    <li class="footer">Generated on Wed May 23 2018 11:36:43 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
